
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
	<title>可用可信家庭市场</title>
	<!--                       CSS                       -->
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="/static/css/reset.css" type="text/css" media="screen" />
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="/static/css/invalid.css" type="text/css" media="screen" />
	<!--                       Javascripts                       -->
	<!-- jQuery -->
	<script type="text/javascript" src="/static/scripts/jquery-1.3.2.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="/static/scripts/simpla.jquery.configuration.js"></script>
	<!-- Facebox jQuery Plugin -->
	<script type="text/javascript" src="/static/scripts/facebox.js"></script>
	<!-- jQuery WYSIWYG Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.wysiwyg.js"></script>
	<!-- jQuery Datepicker Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.datePicker.js"></script>
	<script type="text/javascript" src="/static/scripts/jquery.date.js"></script>
	<!-- jQuery -->
	<link rel="stylesheet" type="text/css" media="all" href="/static/css/motai.css">
	<script type="text/javascript" charset="utf-8" src="/static/js/jquery.leanModal.min.js"></script>
	<style>
		body{
			font-family:微软雅黑;
		}
		#cgmain {width:800px;background-color:#fce0ee;text-align:center;}
		#cgmain .cgdiv {margin-bottom:0px;}

		.table-b {width:780px;
			border-width: 1px;
			border-color: #a9c6c9;
			border-collapse: collapse;margin-left:10px;font-size:15px;}

		.table-b th{
			border-width: 1px;
			padding: 8px;
			border-style: solid;
			border-color: #8F8F8F;
		}
		.table-b td{
			border-width: 1px;
			padding: 8px;
			border-style: solid;
			border-color: #8F8F8F;
		}


	</style>
</head>
<body>
<div id="body-wrapper">
	<!-- Wrapper for the radial gradient background -->
	<div id="sidebar">
		<div id="sidebar-wrapper">

			<div id="profile-links">
				<!-- Logo (221px wide) -->
				<a href="#"><img id="logo" src="/static/images/logo.png" alt="Simpla Admin logo" /></a>

				{$_COOKIE['user_name']},你好 <br/>
				| <a href="/index.php/index/index/uexit" title="Sign Out">退出</a> </div>

			 <ul id="main-nav">
                <!-- Accordion Menu -->
                <!--<li> <a href="#/" class="nav-top-item no-submenu">-->
                    <!--&lt;!&ndash; Add the class "no-submenu" to menu items with no sub menu &ndash;&gt;-->
                    <!--Dashboard </a> </li>-->
                {if condition="!empty($powers['order_action'])"}
                <li> <a href="#" class="nav-top-item current"> 订单操作</a>
                    <ul>
                    	
                        <li><a class="current" href="/index.php/index/index/neworder_list">新订单</a></li>
                        <!-- Add class "current" to sub menu items also -->
                        <li><a href="/index.php/index/index/addorder">创建新订单</a></li>
                        <li><a href="/index.php/index/index/allorder_list">所有订单</a></li>
                    </ul>
                </li>
           	{/if}
           	 {if condition="!empty($powers['cg_action'])"}
                <li> <a href="#" class="nav-top-item"> 采购单 </a>
                    <ul>
                        <li><a href="/index.php/index/index/newcg_list">待处理 采购单</a></li>
                        <li><a href="/index.php/index/index/cg_history">采购单历史</a></li>
                    </ul>
                </li>
             {/if}
              {if condition="!empty($powers['table_action'])"}
                <li> <a href="#" class="nav-top-item"> 报表 </a>
                    <ul>
                        <li><a href="/index.php/index/biao/daybiao">日报表</a></li>
                        <li><a href="/index.php/index/biao/yuebiao">月报表</a></li>
                        <li><a href="/index.php/index/biao/nianbiao">年报表</a></li>
                    </ul>
                </li>
               {/if}
                {if condition="!empty($powers['goods_action'])"}
                <li> <a href="#" class="nav-top-item">菜品管理 </a>
                    <ul>
                        <li><a href="/index.php/index/goods/goods">所有菜品</a></li>
                        <li><a href="/index.php/index/goods/categorys">所有分类</a></li>
                    </ul>
                </li>
                {/if}
                 {if condition="!empty($powers['promotion_action'])"}
                 <li> <a href="#" class="nav-top-item"> 推广活动 </a>
                    <ul>
                        <li><a href="/index.php/index/promotion/snlist">SN优惠码</a></li>
                    </ul>
                </li>
                {/if}
                
                <li> <a href="#" class="nav-top-item"> 个人信息 </a>
                    <ul>
                        <li><a href="/index.php/index/index/user_info">查看信息</a></li>
                        <li><a href="/index.php/index/index/update_pass">修改密码</a></li>
                    </ul>
                </li>
       
                {if condition="!empty($powers['super'])"}
                 <li><a href="#" class="nav-top-item"> 用户管理 </a>
                 	<ul>
                        <li><a href="/index.php/index/admin/user_admin">用户权限</a></li>
                    </ul>
                 </li>
                {/if}

            </ul>
            <!-- End #main-nav -->

		</div>
	</div>
	<!-- End #sidebar -->
	<div id="main-content">
		<!-- Main Content Section with everything -->


	
		<!-- End .shortcut-buttons-set -->
		<div class="clear"></div>
		<!-- End .clear -->
		<h4 style="font-family: 微软雅黑"></h4>
		<div class="content-box">

			<!-- Start Content Box -->
			<div class="content-box-header"><br/>
				<h4><a href="javascript:history.back()" ><<返回</a>&nbsp;&nbsp;修改配送单</h4>
			</div>
			<!-- End .content-box-header -->
			<div class="content-box-content">

				<form method="post" action="/index.php/index/index/update_order2">
					<input type="hidden" name="dayin" value="{$dayin}" />
					<input type="hidden" name="order_id" value="{$order.order_id}" />
					<input type="hidden" name="ps_time" value="{$order.ps_time}" />
					<!--startprint-->
					<div id="cgmain">
						<div class="cgdiv">
							<p style="text-align:center;margin-bottom:0px;"><font style="font-size:20px;font-weight:bold;text-align:center;">配送单</font></p>
							可用可信家庭市场&nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;
							订单号：{$order.order_id}&nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;
							配送日期
							<select id="doc-select-1" name="date">
								<option value="{$order.ps_date}" selected>
									{if condition="!empty($order.ps_date)"}
										{$order.ps_date|date='Y-m-d',###}
									{else/}
										{$order.create_time|date='Y-m-d',###}
									{/if}
								</option>
								<option value="1">今天</option>
								<option value="2">明天</option>
								<option value="3">后天</option>
							</select>

							&nbsp; &nbsp;

							<select id="doc-select-1" name="time">
								{if condition="($order.ps_time == 9)"}
								<option value="9" selected>9:00-10:00</option>
								{elseif condition="$order.ps_time == 10"}
								<option value="10" selected>10:00-11:00</option>
								{elseif condition="$order.ps_time == 11"}
								<option value="11" selected>11:00-12:00</option>

								{elseif condition="$order.ps_time == 15"}
								<option value="15" selected>15:00-16:00</option>
								{elseif condition="$order.ps_time == 16"}
								<option value="16" selected>16:00-17:00</option>
								{elseif condition="$order.ps_time == 17"}
								<option value="17" selected>17:00-18:00</option>
								{else /}
								{/if}
								<option value="9">9:00-10:00</option>
								<option value="10">10:00-11:00</option>
								<option value="11">11:00-12:00</option>
								<option value="15">15:00-16:00</option>
								<option value="16">16:00-17:00</option>
								<option value="17">17:00-18:00</option>
							</select>

						</div>
						<table class="table-b">
							<thead>
							<tr>
								<th style="width:140px;">菜单名</th>
								<th style="width:150px;">单价</th>
								<th style="width:150px;">规格</th>
								<th style="width:160px;">数量</th>
								<th style="width:162px;">操作</th>
							</tr>
							</thead>
							<tbody>

							{volist name="$order['menu']" id="vo" key="kk" }

							<tr	id="goods_id">

								<td class="td">{$vo.name}</td>
								<td class="td">{$vo.price}</td>
								<td class="td">
									{$vo.guige}
								</td>
								<td class="td"><input type="text" name="{$vo.goods_id}" value="{$vo.num}" size="10"/></td>
								<input type="hidden" name="{$vo.goods_id+20}" value="{$vo.num}" />
								<td class="td">
									<div style="float:right;"><img src="/static/images/icons/cross.png" alt="删除菜品" onClick="delgood({$order.order_id},{$vo.goods_id})"/></div>
								</td>
								{/volist}
							</tr>

							<tr>
								<td class="td" colspan="3">

									收&nbsp;货 &nbsp;人：<input type="text" name="infoname" value="{$order.address_info.name}"/><br/>
									联系电话：<input type="text" name="infophone" value="{$order.address_info.phone}"/> <br/>
									收货地址：<input type="text" style="width:400px;" name="infoaddress" value="{$order.address_info.address}"/><br/>
									{if condition="!empty($order['discount_detail'])"}
									优惠：{$order['discount_detail']->desc}&nbsp;{$order['discount_detail']->discount_money}
									{/if}
								</td>
								<td  class="td" colspan="4">
									顾客备注：
									<textarea name="desc" style="width:300px;height:60px;">{$order.desc}</textarea><br/>
									商家备注：
									<textarea name="store_desc" style="width:300px;height:60px;">{$order.store_desc}</textarea>
								</td>
							</tr>

							</tbody>
						</table>



						<font style="margin-left:10px;float:left;">
							原价: {$order.price} ￥&nbsp; &nbsp; &nbsp;
							应收: <input type="text" name="discount_price" value="{$order.discount_price}" style="width:70px;"/> ￥&nbsp; &nbsp; &nbsp;
							实收: {$order.online_pay}&nbsp;
							{if condition="$order['pay_type'] eq 'offline'" }
							(线下)
							{elseif condition="$order['pay_type'] eq 'weixin'" }
							(微信)
							{/if}
						</font>
						&nbsp; &nbsp;
						配送员：    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
						客户签名: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
						<br />
						<br />


					</div>
					<!--endprint-->

					<div style="text-align:center;width:800px;"><button type="submit" class="button medium back">提交</button></div>
				</form>


			</div>
			<!-- End #tab1 -->

			<!-- End #tab2 -->


		</div>
		<!-- End .content-box-content -->
	</div>
	<!-- End .content-box -->



</div>
<!-- End #main-content -->
</div>

<script>

	function smallname(value){
		alert(value);
		$.get("/index.php/index/index/option", function(data){

		},'json');
	}


function delgood(order_id,goods_id)
    {
        if(confirm("你确信要删除该菜品吗？"))
        {
            //如果是true ，那么就把页面转向
            location.href="/index.php/index/index/updateorder_delgood/order_id/"+order_id+"/goods_id/"+goods_id;
        }
        else
        {
            return false;
        }
    }
</script>

<!-- won模态框（Modal） -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1" style="display:none;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">你确定删除该菜品吗？
			<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
		</div>
		<form method="post" action="/index.php/index/index/delete_good">
			<input type="hidden" name="str" value="" id="del_str" />
			<input type="hidden" name="order_id" value="" id="cancel" />
			<input type="hidden" name="status" value="update_order" />
			<br />
			<button type="submit" class="submit btn btn-primary">
				确定
			</button>

		</form>
	</div>
</div>
<!-- won模态框（Modal） -->
</body>
</html>



